package com.spica.spicaschool.ui.circle

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter

class CircleFragmentAdapter(fm: FragmentManager, behavior: Int) :
    FragmentPagerAdapter(fm, behavior) {

    private val fragments = arrayListOf(
        DiariesFragment.newInstance(1),
        DiariesFragment.newInstance(1),
        DiariesFragment.newInstance(1)
    )

    private val titles = arrayListOf("推荐", "附近", "热门")

    override fun getCount(): Int = fragments.size

    override fun getItem(position: Int): Fragment = fragments[position]

    override fun getPageTitle(position: Int): CharSequence = titles[position]
}
